const state = {
  currentGameCode: '',
  enterType: 'h5',
  needShake: false,
  gameUrl: '',
  gameStatus: 0,
  hbId: '', // 红包雨id
};

const mutations = {
  setGameInfo: (state, data) => {
    state.currentGameCode = data.currentGameCode;
    state.enterType = data.enterType;
    state.gameUrl = data.gameUrl;
    state.needShake = data.needShake;
  },
  setGameStatus: (state, data) => {
    state.gameStatus = data;
  },
  resetGameInfo: (state) => {
    state.currentGameCode = '';
    state.enterType = 'h5';
    state.gameUrl = '';
    state.needShake = false;
  },
  setHbyId: (state, data) => {
    state.hbId = data;
  },
};

const actions = {
};

export default {
  namespaced: true,
  state,
  mutations,
  actions,
};
